package com.sm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sm.dao.CourseListDao;
import com.sm.entity.CourseListEntity;
import com.sm.service.CourseListService;
import com.sm.utils.PageUtils;
import com.sm.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("courseListService")
public class CourseListServiceImpl extends ServiceImpl<CourseListDao, CourseListEntity> implements CourseListService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CourseListEntity> page = this.page(
                new Query<CourseListEntity>().getPage(params),
                new QueryWrapper<CourseListEntity>()
        );

        return new PageUtils(page);
    }

}